/*
 * Created on 2006-2-20
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.hitrust.gs.net;

import com.hitrust.gs.service.*;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author simonyi
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class GSAuditBean implements GSBaseBean {

    private String orderTempID;
    private String orderDetailID ;
    private String manufactureCode;
    private String manufactureUnitPrice;
    private String orderCount;
    private String sendCount;
    private String receiveCount;
    private String manufactureTotalPrice;
    private String manufactureSendPrice;
    private String manufactureReceivePrice;
    
    public Object process(ResultSet rs ) throws SQLException {
        GSAuditBean tBean = new GSAuditBean();
        
        tBean.setOrderDetailID(rs.getString("P0"));
        tBean.setManufactureCode(rs.getString("P1"));
        tBean.setManufactureUnitPrice(rs.getString("P3"));
        tBean.setOrderTempID(rs.getString("P4"));
        
        tBean.setOrderCount(rs.getString("P10")==null?"0":rs.getString("P10"));
        tBean.setSendCount(rs.getString("P11")==null?"0":rs.getString("P11"));
        tBean.setReceiveCount(rs.getString("P12")==null?"0":rs.getString("P12"));
                
        BigDecimal bd0 = new BigDecimal(tBean.manufactureUnitPrice).multiply(new BigDecimal(tBean.orderCount));
        tBean.setManufactureTotalPrice(bd0.toString());
        
        BigDecimal bd1 = new BigDecimal(tBean.manufactureUnitPrice).multiply(new BigDecimal(tBean.sendCount));
        tBean.setManufactureSendPrice(bd1.toString());
        
        BigDecimal bd2 = new BigDecimal(tBean.manufactureUnitPrice).multiply(new BigDecimal(tBean.receiveCount));
        tBean.setManufactureReceivePrice(bd2.toString());
        
        return tBean ;

    }
    public String getManufactureCode() {
        return manufactureCode;
    }
    public void setManufactureCode(String manufactureCode) {
        this.manufactureCode = manufactureCode;
    }
    public String getManufactureTotalPrice() {
        return manufactureTotalPrice;
    }
    public void setManufactureTotalPrice(String manufactureTotalPrice) {
        this.manufactureTotalPrice = manufactureTotalPrice;
    }
    public String getManufactureUnitPrice() {
        return manufactureUnitPrice;
    }
    public void setManufactureUnitPrice(String manufactureUnitPrice) {
        this.manufactureUnitPrice = manufactureUnitPrice;
    }
    public String getOrderCount() {
        return orderCount;
    }
    public void setOrderCount(String orderCount) {
        this.orderCount = orderCount;
    }
    public String getOrderDetailID() {
        return orderDetailID;
    }
    public void setOrderDetailID(String orderDetailID) {
        this.orderDetailID = orderDetailID;
    }
    public String getOrderTempID() {
        return orderTempID;
    }
    public void setOrderTempID(String orderTempID) {
        this.orderTempID = orderTempID;
    }
    public String getReceiveCount() {
        return receiveCount;
    }
    public void setReceiveCount(String receiveCount) {
        this.receiveCount = receiveCount;
    }
    public String getSendCount() {
        return sendCount;
    }
    public void setSendCount(String sendCount) {
        this.sendCount = sendCount;
    }
    public String getManufactureReceivePrice() {
        return manufactureReceivePrice;
    }
    public void setManufactureReceivePrice(String manufactureReceivePrice) {
        this.manufactureReceivePrice = manufactureReceivePrice;
    }
    public String getManufactureSendPrice() {
        return manufactureSendPrice;
    }
    public void setManufactureSendPrice(String manufactureSendPrice) {
        this.manufactureSendPrice = manufactureSendPrice;
    }
}
